package fr.xebia.service.ejb;

import java.io.Serializable;
import java.util.List;

import javax.ejb.CreateException;

import org.springframework.ejb.support.AbstractStatelessSessionBean;

import fr.xebia.data.Adresse;
import fr.xebia.service.AdresseService;

public class AdresseServiceEJB extends AbstractStatelessSessionBean implements AdresseService {

	private static final long serialVersionUID = 1L;

	private static final String BEAN_NAME = "adresseServiceImpl";

	private AdresseService adresseService;

	@Override
	protected void onEjbCreate() throws CreateException {
		this.adresseService = (AdresseService) getBeanFactory().getBean(BEAN_NAME);
	}

	public void delete(Adresse object) throws Exception {
		this.adresseService.delete(object);
	}

	public void delete(List<Adresse> objects) throws Exception {
		this.adresseService.delete(objects);
	}

	public void deleteById(List<? extends Serializable> listeObject) throws Exception {
		this.adresseService.deleteById(listeObject);
	}

	public void deleteById(Serializable id) throws Exception {
		this.adresseService.deleteById(id);
	}

	public Adresse get(Serializable id, boolean initializeChildren) throws Exception {
		return this.adresseService.get(id, initializeChildren);
	}

	public Adresse get(Serializable id) throws Exception {
		return this.adresseService.get(id);
	}

	public int getMaxResults() throws Exception {
		return this.adresseService.getMaxResults();
	}

	public List<Adresse> list() throws Exception {
		return this.adresseService.list();
	}

	public List<Adresse> list(boolean isChildrenInitialized) throws Exception {
		return this.adresseService.list(isChildrenInitialized);
	}

	public Serializable save(Adresse object) throws Exception {
		return this.adresseService.save(object);
	}

	public List<Serializable> save(List<Adresse> listeObject) throws Exception {
		return this.adresseService.save(listeObject);
	}

	public List<Adresse> search(Adresse object) throws Exception {
		return this.adresseService.search(object);
	}

	public void update(Adresse object) throws Exception {
		this.adresseService.update(object);
	}

	public void update(List<Adresse> objects) throws Exception {
		this.adresseService.update(objects);
	}

}
